fix: remove alias rigid before calling relate#158792
Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @mati865 (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
Why was this reviewer chosen?The reviewer was selected based on:
|
|
Hi, @adwinwhite. I found the issue is easily resolved and fixed in this PR. If you already working on this problem, sorry for taking it without your confirm. |
relaterelate
|
Hi, could you check whether the problem can be fixed at the root? Like if there's something that should be normalized but not. |
| @@ -0,0 +1,17 @@ | |||
| // Regression test for #158773. | |||
| // This test is cited from #158773. | |||
| //@ compile-flags: -Znext-solver=globally | |||
There was a problem hiding this comment.
Please put this flags line at the beginning of the file.
And you don't have to repeat the issue number for three times. One comment to reference it is fine.
nits :>
|
Thanks for reviewing! Okay I will check it. But I will do it after my working hours so it will be late… |
This PR fixes #158773.
This fix resolves regression from at least nightly 1.96.0, as I checked.
Cause of issue
In the current code,
relate(a, b)is called on the typeSameTypeModuloInfer, which is outside of the trait resolver.So the rigid should be removed.
I inserted
ty::set_aliases_to_non_rigidbefore callingrelatemethod and now it works correctly.